package cn.com.cifi.mars.service;


import cn.com.cifi.mars.bean.vo.price.FilePreviewVO;
import cn.com.cifi.mars.entity.UploadFile;
import com.baomidou.mybatisplus.extension.service.IService;
import org.hibernate.validator.constraints.EAN;

import java.util.List;

public interface FileUploadService extends IService<UploadFile> {

    //查询是否有相同的文件名
    List<UploadFile> selectSameFileName(String fileName);
    //上传成功后向t_file_upload插入记录
    String saveFileUploadRecord(String fileName,String suffixName,String address,String originalFilename,String createdBy);
    //根据fileId查询文件存储路径
    UploadFile selectFileById(String fileId);
    //t_file_upload插入bill_id和created_by
    void updateBillId(String businessKey, List<String> files);
    //t_file_upload插入pre_view_url
    void updatePreViewUrl(String id,String url);
    //根据businessKey查询上传的文件
    List<UploadFile> selectFileByBusinessKey(String businessKey);
    //根据fileI删除文件
    int deleteFile(String fileId, int del);

    List<FilePreviewVO> getFilePreview(String billId);
}
